﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="NCC.aspx.cs" Inherits="Admin_NCC" Title="Quản lý nhà cung cấp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link rel="Stylesheet" href="/Online/CSS/Admin.css" type="text/css" />
    <style type="text/css">
        #pnNhap
        {
            margin-top: 10px;
        }
        .GV
        {
            color: White;
            font-size: 17px;
        }
        .GV1
        {
            border: 1px solid #333;
            border-left-style: hidden;
            border-right-style: hidden;
        }
        .HyperLink1
        {
            margin-left: 10px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="pnanel" runat="server">
        <ContentTemplate>
            <div class="tieude">
                QUẢN LÝ NHÀ CUNG CẤP</div>
            <div style="height: 330px;">
                <div style="margin-top: 10px;">
                    <asp:GridView ID="gvNCC" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        DataKeyNames="MaNCC" CssClass="GV1" PageSize="10" Width="100%" PagerStyle-CssClass="GV"
                        PagerStyle-ForeColor="White">
                        <Columns>
                            <asp:TemplateField HeaderText="Xóa" HeaderStyle-HorizontalAlign="Left">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckq1" runat="server" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                                <HeaderStyle HorizontalAlign="Center" />
                                <HeaderStyle ForeColor="White" />
                                <ItemStyle ForeColor="White" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ID" Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="Ma" runat="server" Text='<%#Eval("MaNCC") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                                <HeaderStyle HorizontalAlign="Center" />
                                <HeaderStyle ForeColor="White" />
                                <ItemStyle ForeColor="White" />
                                <ControlStyle ForeColor="White" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Nhà cung cấp">
                                <ItemTemplate>
                                    <asp:HyperLink ID="hpten" runat="server" Text='<%#Eval("TenNCC") %>' NavigateUrl='<%#"/Online/Admin/NCC.aspx?"+"m="+Eval("MaNCC") %>'
                                        CssClass="HyperLink1"></asp:HyperLink>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Center" />
                                <HeaderStyle ForeColor="White" />
                                <ItemStyle ForeColor="White" />
                                <ControlStyle ForeColor="White" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Địa chỉ">
                                <ItemTemplate>
                                    <asp:Label ID="dc" runat="server" CssClass="HyperLink1" Text='<%#Eval("Diachi") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Center" />
                                <HeaderStyle ForeColor="White" />
                                <ItemStyle ForeColor="White" />
                                <ControlStyle ForeColor="White" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Email">
                                <ItemTemplate>
                                    <asp:Label ID="email" runat="server" CssClass="HyperLink1" Text='<%#Eval("Email") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                                <HeaderStyle HorizontalAlign="Center" />
                                <HeaderStyle ForeColor="White" />
                                <ItemStyle ForeColor="White" />
                                <ControlStyle ForeColor="White" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
                <div id="pnNhap" style="margin-left: 10px;">
                    <span style="font-size: 17px; color: White;">Nhà cung cấp:</span>
                    <asp:TextBox ID="txtten" runat="server" Width="150px"></asp:TextBox>
                    <span style="font-size: 17px; color: White;">Địa chỉ:</span>
                    <asp:TextBox ID="txtdc" runat="server" Width="180px"></asp:TextBox>
                    <span style="font-size: 17px; color: White;">Email:</span>
                    <asp:TextBox ID="txtemail" runat="server" Width="150px"></asp:TextBox>
                    <span style="font-size: 17px; color: White;">Số điện thoại:</span>
                    <asp:TextBox ID="txtsdt" runat="server" Width="150px"></asp:TextBox>
                    <br />
                    <br />
                    <asp:Button ID="btnThem" runat="server" Width="80px" Text="Thêm" OnClick="btnThem_Click" />
                    <asp:Button ID="btnSua" runat="server" Width="80px" Text="Sửa" OnClick="btnSua_Click" />
                    <asp:Button ID="btnXoa" runat="server" Text="Xóa" Width="80px" OnClick="btnXoa_Click" />
                    <asp:Button ID="btnHuy" runat="server" Text="Hủy" Width="80px" OnClick="btnHuy_Click" />
                </div>
                <div style="color: White; margin-top: 10px; margin-left: 20px; width: 1024px; text-align: center;
                    font-style: italic; font-weight: bold;">
                    <asp:Label ID="tb" runat="server"></asp:Label><br />
                </div>
            </div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnThem" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnSua" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnXoa" EventName="Click" />
        </Triggers>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="pro" runat="server" AssociatedUpdatePanelID="pnanel">
    </asp:UpdateProgress>
</asp:Content>
